package fairino;

public class TestMain {
    public static void main(String[] args)
    {
        Robot robot = new Robot();
        robot.SetReconnectParam(true,20,500);//设置重连次数、间隔
        robot.LoggerInit(FrLogType.DIRECT, FrLogLevel.INFO, "D://log", 10, 10);
        int rtn = robot.RPC("192.168.58.2");
        if(rtn == 0)
        {
            System.out.println("rpc连接 success");
        }
        else
        {
            System.out.println("rpc连接 fail");
            return ;
        }

        DescPose startdescPose =new DescPose(49.409, 383.497, 1280.873, -125.781, 68.777, 140.179);
        JointPos startjointPos = new JointPos();

        int result1 = robot.GetInverseKin(0, startdescPose, -1, startjointPos);
        System.out.println(result1);

        ExaxisPos exaxisPos =new ExaxisPos(0, 0, 0, 0);
        DescPose offdese = new DescPose(0, 0, 0, 0, 0, 0);

        int result2 = robot.MoveJ(startjointPos,startdescPose,1,0,100,100,100,exaxisPos,-1,0,offdese);
        System.out.println(result2);
    }
}
